package com.bizfx.component
{
	import com.bizfx.component.mainform.IMainForm;
	
	import mx.collections.ArrayCollection;
	import mx.collections.IList;
	import mx.core.Application;
	
	/**
	 * bizfx的Application基类。
	 * 
	 */
	public class BaseBizApplication extends Application implements IBizApplication
	{
		/**
		 * 程序主界面接口
		 */
		private var _mainUI:IMainForm;
		
		public function get mainUI(): IMainForm {
			return _mainUI;  
		}
		
		public function set mainUI(value: IMainForm):void {
			_mainUI = value;  
		} 
		
		private static var _instance:IBizApplication;
		
		public static function get instance():IBizApplication {
			return _instance;
		}
		
		private var _authenticationInfo:Object;
		[Bindable]
		public function get authenticationInfo():Object {
			if (_authenticationInfo == null) {
				_authenticationInfo = new Object();
			} 
			return _authenticationInfo;
		}
		
		public function set authenticationInfo(value:Object):void {
			_authenticationInfo = value;
		}
		
		private var _userPermissions:IList;
		
		public function get userPermissions():IList {
			if (_userPermissions == null) {
				_userPermissions = new ArrayCollection();
			}
			return _userPermissions;
		}
		
		public function set userPermissions(value:IList):void {
			_userPermissions = value;
		}
		
		public function BaseBizApplication() {
			_instance = this;
			super();
		}
	}
}